<?php defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' );

/* JoomLeague League Management and Prediction Game for Joomla!
 * @version $Id: view.tpl.php 1150 2008-06-24 14:33:03Z julienv $
 * @package Joomleague
 * @copyright Copyright (C) 2007  JoomLeague
 * @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see _joomleague_license.txt
 *  
 * Homepage: http://www.joomleague.de
 * Support: htt://www.joomleague.de/forum/
 * 
 * This file is part of JoomLeague.
 *  
 * JoomLeague is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * Please note that the GPL states that any headers in files and
 * Copyright notices as well as credits in headers, source files
 * and output (screens, prints, etc.) can not be removed.
 * You can extend them with your own credits, though...
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 * 
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 *
 * The "GNU General Public License" (GPL) is available at
 * http://www.gnu.org/copyleft/gpl.html.
*/ 

?>
<script>

function show_hide_nav(nav_container, opener, images) {
  var showimages = false;
  if (!images) showimages = true;
  var nav_element = document.getElementById(nav_container);
  if (showimages) {
  var nav_opener = document.getElementById(opener);
  var bg_open_image = 'components/com_joomleague/images/arrow_close.png';
  var bg_close_image = 'components/com_joomleague/images/arrow_open.png';
  }
  if(nav_element.style.display == 'block') {
  	nav_element.style.display = 'none';
  	if (showimages) {
  	nav_opener.style.backgroundImage = 'url(components/com_joomleague/images/arrow_open.png)';
  	nav_opener.style.backgroundRepeat='no-repeat';
   }
  }
  else {
    nav_element.style.display='block';
    if (showimages) {
    nav_opener.style.backgroundImage = 'url(components/com_joomleague/images/arrow_close.png)';
    nav_opener.style.backgroundRepeat='no-repeat';
    }
  }

}

</script>
<?php $jl_v = new JoomLeagueVersion();
$joomleague_version = $jl_v->version;
?>

<link href="<?php echo _JOOMLA_JL_LIVE_SITE;?>/administrator/components/com_joomleague/css/joomleague_admin.css" rel="stylesheet" type="text/css" />
<div id="content-pad">
<table width="100%">
<tr><td valign="top" align="left" width="50px">
<!-- Sidebar -->
<div id="leftpad">
	<div class="stepbar">
    <div class="t">
      <div class="t">
        <div class="t">
        </div>
      </div>
    </div>
    <div class="m" align="left">
    <?php
    // form with dropdown fields for quick navigation 
    global $project, $round, $joomleague_team;
    echo jl_getProjectsList($project, $round, $joomleague_team);
    ?>
    </div>
    <div class="b">
      <div class="b">
        <div class="b"></div>
      </div>
    </div>
  </div>
<?php if (JL_ADMIN_MODE == 'league_management') { ?>
  <div class="stepbar">
	  <div class="t">
      <div class="t">
        <div class="t">
        </div>
      </div>
    </div>
    <div class="m" align="left">
    	<h1 id="head_data_project" style="cursor:pointer;background-image:url(components/com_joomleague/images/arrow_close.png);background-repeat:no-repeat;background-position:right center;" onclick="show_hide_nav('jl_data_nav', 'head_data_project')">
    	 <!--<img align="left" src="../administrator/components/com_joomleague/images/blank_green.png">&nbsp;--><?php echo _JL_ADMIN_VIEW_DATA;?>
    	</h1>
	  	<div id="jl_data_nav" style="display:block">
	  		<div class="step-off">
					<img src="components/com_joomleague/images/projects.png" alt="<?php echo _JL_ADMIN_VIEW_PROJECTS;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK;?>"><?php echo _JL_ADMIN_VIEW_PROJECTS;?></a>
			  </div>
			  <div class="step-off">
				  <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=seasons';?>"><?php echo _JL_ADMIN_VIEW_SEASONS;?></a>
				</div>
			  <div class="step-off">
		  		<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=leagues';?>"><?php echo _JL_ADMIN_VIEW_LEAGUES;?></a>
			  </div>
				<div class="step-off">
				  <img src="components/com_joomleague/images/clubs.png" alt="<?php echo _JL_ADMIN_VIEW_CLUBS;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=clubs';?>"><?php echo _JL_ADMIN_VIEW_CLUBS;?></a>			
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/teams.png" alt="<?php echo _JL_ADMIN_VIEW_TEAMS;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=teams';?>"><?php echo _JL_ADMIN_VIEW_TEAMS;?></a>			
				</div>
				<div class="step-off">
	        <img src="components/com_joomleague/images/players.png" alt="<?php echo _JL_ADMIN_VIEW_PLAYERS;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=players';?>"><?php echo _JL_ADMIN_VIEW_PLAYERS;?></a>			
				</div>			
				<div class="step-off">
					<img src="components/com_joomleague/images/positions.png" alt="<?php echo _JL_ADMIN_VIEW_POSITIONS;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=positions';?>"><?php echo _JL_ADMIN_VIEW_POSITIONS;?></a>			
				</div>
				<div class="step-off">
				  <img src="components/com_joomleague/images/events.png" alt="<?php echo _JL_ADMIN_VIEW_EVENTS;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=eventtypes';?>"><?php echo _JL_ADMIN_VIEW_EVENTS;?></a>			
				</div>
	      <div class="step-off">
					<img src="components/com_joomleague/images/playground.png" alt="<?php echo _JL_ADMIN_VIEW_PLAYGROUNDS;?>"/>
					  <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=playgrounds';?>"><?php echo _JL_ADMIN_VIEW_PLAYGROUNDS;?></a>      
				</div>			
	      <div class="step-off">
					<img src="components/com_joomleague/images/referee.png" alt="<?php echo _JL_ADMIN_VIEW_REFEREES;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=referees';?>"><?php echo _JL_ADMIN_VIEW_REFEREES;?></a>      
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/world.png" alt="<?php echo _JL_ADMIN_EDIT_LIST_COUNTRIES;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=countries';?>"><?php echo _JL_ADMIN_EDIT_LIST_COUNTRIES;?></a>    
				</div>
			</div>
    </div>
   
    <div class="b">
      <div class="b">
       <div class="b">
       </div>
      </div>
    </div>
  </div>
	<!-- Query if project is used, then show Details -->  	
	<?php if( isset($project) && $project->id ){ 
      $overall_config = $project->getTemplateConfig("overall.tpl");
      $use_events = (isset($overall_config['use_jl_events'])) ? $overall_config['use_jl_events'] : 0;
    ?>
	<div class="stepbar">
    <div class="t">
      <div class="t">
        <div class="t">
        </div>
      </div>
    </div>  	
  	<div class="m" align="left">
  		<h1 id="head_nav_project" style="cursor:pointer;background-image:url(components/com_joomleague/images/arrow_close.png);background-repeat:no-repeat;background-position:right center;" onclick="show_hide_nav('jl_project_nav', 'head_nav_project')">
	  		<!--<img align="left" src="../administrator/components/com_joomleague/images/blank_yellow.png">&nbsp;-->
	      <?php if (strlen($project->name) >= 28) {$projectname = substr($project->name,0,28)."...";}
	      else $projectname = $project->name;
	      echo $projectname; ?>
      </h1>
      <div id="jl_project_nav" style="display:block">
	      <div class="step-off">
					<img src="components/com_joomleague/images/templates.png" alt="<?php echo _JL_ADMIN_VIEW_TEMPLATES;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=template_config';?>"><?php echo _JL_ADMIN_VIEW_TEMPLATES;?></a>			
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/teams.png" alt="<?php echo _JL_ADMIN_VIEW_TEAMS;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=teamtool';?>"><?php echo _JL_ADMIN_VIEW_TEAMS;?></a>			
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/positions.png" alt="<?php echo _JL_ADMIN_VIEW_POSITIONS;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=postool';?>"><?php echo _JL_ADMIN_VIEW_POSITIONS;?></a>			
				</div>
				<?php
	        if ($project->project_type=='DIVISIONS_LEAGUE') {
				?>
				<div class="step-off">
					<img src="components/com_joomleague/images/division.png" alt="<?php echo _JL_ADMIN_VIEW_DIVISION;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=divisions';?>"><?php echo _JL_ADMIN_VIEW_DIVISIONS;?></a>			
				</div>
				<?php
				}
				?>
				<div class="step-off">
					<img src="components/com_joomleague/images/calendar.png" alt="<?php echo _JL_ADMIN_VIEW_MATCHDAYS;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=rounds';?>"><?php echo _JL_ADMIN_VIEW_MATCHDAYS;?></a>			
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/matches.png" alt="<?php echo _JL_ADMIN_VIEW_MATCH_DETAILS;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=matches';?>"><?php echo _JL_ADMIN_VIEW_MATCH_DETAILS;?></a>			
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/link.png" alt="<?php echo _JL_ADMIN_VIEW_FRONTEND_LINKS;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=frontend';?>"><?php echo _JL_ADMIN_VIEW_FRONTEND_LINKS;?></a>			
				</div>
		  </div>
  	</div>
    <div class="b">
      <div class="b">
        <div class="b"></div>
      </div>
    </div>
  </div>
	<?php } ?>
	<!-- Query if Team is used, then show Details -->  	          
	<?php if(isset($team) && is_a($team, 'JL_Team')){ ?>
	<div class="stepbar">
    <div class="t">
      <div class="t">
        <div class="t">
        </div>
      </div>
    </div>  
    <div class="m" align="left">
			<h1 id="head_nav_team" style="cursor:pointer;background-image:url(components/com_joomleague/images/arrow_close.png);background-repeat:no-repeat;background-position:right center;" onclick="show_hide_nav('jl_team_nav', 'head_nav_team')"><!--<img align="left" src="../administrator/components/com_joomleague/images/blank_blue.png">&nbsp;-->
	      <?php if (strlen($team->name) >= 28) {$teamname = substr($team->name,0,28)."...";}
	      else $teamname = $team->name;
	      echo $teamname; ?>
	    </h1>
      <div id="jl_team_nav" style="display:block">
	      <div class="step-off">
					<img src="components/com_joomleague/images/player.png" alt="<?php echo _JL_ADMIN_VIEW_PLAYER_DETAILS;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=playertool';?>"><?php echo _JL_ADMIN_VIEW_PLAYER_DETAILS;?></a>      	
				</div>
				<div class="step-off">
		      <img src="components/com_joomleague/images/player.png" alt="<?php echo _JL_ADMIN_VIEW_TEAMSTAFF_DETAILS;?>"/>
		      <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=teamstaff';?>"><?php echo _JL_ADMIN_VIEW_TEAMSTAFF_DETAILS;?></a>       
	      </div>
	  	</div>
  	</div>
  	<div class="b">
      <div class="b">
        <div class="b"></div>
      </div>
    </div>
  </div>
	  <?php 
    } 
  }
  elseif (JL_ADMIN_MODE == 'prediction_management') { ?>
  <div class="stepbar">
    <div class="t">
      <div class="t">
        <div class="t"></div>
      </div>
    </div>  
    <div class="m" align="left">
      <h1 id="head_nav_pred_data" style="cursor:pointer;background-image:url(components/com_joomleague/images/arrow_close.png);background-repeat:no-repeat;background-position:right center;" onclick="show_hide_nav('jl_pred_data_nav', 'head_nav_pred_data')"><?php echo _JL_ADMIN_VIEW_DATA;?>
      </h1>
      <div id="jl_pred_data_nav" style="display:block">
	      <div class="step-off">
				 	<img src="components/com_joomleague/images/prediction.png" alt="<?php echo _JL_ADMIN_VIEW_TIPGAME_USERS;?>"/>
				 	<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=predictions&adminmode=prediction_management';?>"><?php echo _JL_ADMIN_EDIT_FORM_PROJECTS_TITLE5;?></a>
				</div>
	      <div class="step-off">
				 	<img src="components/com_joomleague/images/user_edit.png" alt="<?php echo _JL_ADMIN_VIEW_TIPGAME_USERS;?>"/>
          <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=prediction_users&adminmode=prediction_management';?>"><?php echo _JL_ADMIN_VIEW_TIPGAME_USERS;?></a>
				</div>
		  </div>
	  </div>
		<div class="b">
	    <div class="b">
	      <div class="b"></div>
	    </div>
	  </div>
	</div>
	<?php
	}
	?>
  <!--- Maintenance Start -->
	<div class="stepbar">
    <div class="t">
      <div class="t">
        <div class="t"></div>
      </div>
    </div>
    <div class="m" align="left">
			<h1 id="head_maintainance_project" 
			    style="cursor:pointer;background-image:url(components/com_joomleague/images/arrow_open.png);background-repeat:no-repeat;background-position:right center;" 
			    onclick="show_hide_nav('jl_maintainance_nav', 'head_maintainance_project')">
			    <?php echo _JL_ADMIN_VIEW_MAINTENANCE;?>
			</h1>
			<div id="jl_maintainance_nav" style="display:none">
	      <div class="step-off">
	        <img src="components/com_joomleague/images/projects.png" alt="<?php echo _JL_ADMIN_VIEW_CONFIGURATION;?>"/>
	        <a href="index2.php?option=com_joomleague&act=config"><?php echo _JL_ADMIN_VIEW_CONFIGURATION;?></a>  		
			  </div>
				<div class="step-off">
					<img src="components/com_joomleague/images/import.png" alt="<?php echo _JL_ADMIN_VIEW_JL_IMPORT;?>"/>
	        <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=import'; ?>"><?php echo _JL_ADMIN_VIEW_JL_IMPORT; ?></a>
				</div>
	      <div class="step-off">
					<img src="components/com_joomleague/images/import.png" alt="<?php echo _JL_ADMIN_VIEW_JL_IMPORT."V2";?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=JLimport'; ?>"><?php echo _JL_ADMIN_VIEW_JL_XML_IMPORT;?></a>
				</div>
				<div class="step-off">
		      <img src="components/com_joomleague/images/export.png" alt="<?php echo _JL_ADMIN_VIEW_JL_EXPORT." v2";?>"/>
		      <a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=JLexport'; ?>"><?php echo _JL_ADMIN_VIEW_JL_EXPORT;?></a>
				</div>   
				<div class="step-off">
					<img src="components/com_joomleague/images/import.png" alt="<?php echo _JL_ADMIN_VIEW_LMO_IMPORT;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=LMOimport'; ?>"><?php echo _JL_ADMIN_VIEW_LMO_IMPORT;?></a>
				</div>
				<div class="step-off">
					<img src="components/com_joomleague/images/update.png" alt="<?php echo _JL_ADMIN_VIEW_UPDATES;?>"/>
					<a href="<?php echo JL_ADMIN_COMPONENT_LINK.'&act=updates'; ?>"><?php echo _JL_ADMIN_VIEW_UPDATES;?></a>
				</div>
			</div>
	  </div>
	  <div class="b">
	    <div class="b">
	      <div class="b"></div>
	    </div>
	  </div>
	</div>
	<!--- Maintenance End --> 	
  
  <!--- Joomleague Logo Start -->
  <div class="stepbar">
    <div class="t">
      <div class="t">
        <div class="t">
        </div>
      </div>
    </div>  	
    <div class="m" align="center">
      <div class="box"></div>JoomLeague - <?php echo $jl_v->version;?>
  	</div>  	
    <div class="b">
      <div class="b">
        <div class="b"></div>
      </div>
    </div>
  </div>
  <!--- JoomLeague Logo End -->
</div><!--- left pad end -->
  
  <!-- Content START -->  
</td>
<td valign="top" align="left">
<!-- Load Content -->
<?php require_once $view; ?>
<!-- Content END -->		
</td></tr>
</table>
</div><!--- content-pad end -->
	<div id="footer1">
		<div id="footer2"></div>
	</div>
